// Town script for town 38: Senarti capital 1

begintownscript;

variables;

int x,i,j,choice;

body;

beginstate INIT_STATE;
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;

if (get_flag(38,8) == 1)
		end();
	message_dialog("You climb up from the stairs, and find yourself in a cramped room with rubble and dust everywhere. You wonder where the stairs have led you, as the floor suggests a big building, possibly some kind of palace.","");
	set_flag(38,8,1);

break;

beginstate 10;
	move_to_new_town(36,40,10);
break;

beginstate 11;
if (get_flag(38,0) == 1)
		end();
	message_dialog("You walk through the doors into a big hall. You see two priests, some pillars, and rows and rows of chairs. This must be a temple, and you violated it by coming in as a non-Senarti.","The priests look angry. Coming in here wasn't such a great idea.");
	set_flag(38,0,1);
break;

beginstate 12;
if (get_flag(38,1) == 1)
		end();
	message_dialog("This is one of the city gates. Senarti archers are lined up at the windows, ready to shoot at you.","");
	set_flag(38,1,1);
break;

beginstate 13;
if (get_flag(38,2) == 1)
		end();
	message_dialog("This is a small dock. There are several boats waiting for passengers or goods to be brought away over the river that passes along the city. This may very well be your way out.","");
	set_flag(38,2,1);
break;

beginstate 14;
if (get_flag(38,3) == 1)
		end();
	message_dialog("Now, this is a surprising sight. What humans use lizards for, the Senarti use rats for. The carrying of goods and pulling of the carts is actually done by the Senarti's food source.","This seems quite handy. When a merchant gets stuck, he'll have his food with him.");
	set_flag(38,3,1);
break;

beginstate 15;
if (get_flag(38,4) == 1)
		end();
	message_dialog("The room in front of you is tiled with beautiful green tiles. A small altar gives the room a sinister appearance.","Then you also see the owner. It is a Senarti mage, probably the commander of the soldiers.");
	set_flag(38,4,1);
break;

beginstate 16;
if (get_flag(38,5) == 1)
		end();
	message_dialog("This small house reminds you of the cave that brought you into the Senarti lands. It seems as though all cities are connected by these tunnels.","");
	set_flag(38,5,1);
break;

beginstate 17;
if (get_flag(38,6) == 1)
		end();
	message_dialog("The city seems to go on behind this gate, but it all looks nicer and better organised. It may well be the part of the city where all high officials live. That means also the Senarti king, or whatever they call it.","");
	set_flag(38,6,1);
break;

beginstate 18;
if (get_flag(38,7) == 1)
		end();
	message_dialog("The Senarti made a campfire here. The poorer Senarti probably come together here to tell story's to one and other.","It's clearly something they took over from humans.");
	set_flag(38,7,1);
break;

beginstate 19;

// Not used anymore

break;

beginstate 20;
if (get_flag(38,9) == 1)
		end();
	message_dialog("You open the doors. You see a paved road, cave ground, a high cave ceiling and some buildings. It looks like some underground city.","");
	set_flag(38,9,1);
break;

beginstate 21;
	move_to_new_town(40,6,41);
break;

beginstate 22;
reset_dialog();
add_dialog_str(0,"This is one of those tunnel entrances, as you also saw in the Senarti fort. You are not sure to what city, fort or cave this tunnel might lead. Try it anyway?",0);
add_dialog_choice(0,"Walk in");
add_dialog_choice(1,"Leave");
choice = run_dialog(1);

	if (choice == 1) {
			message_dialog("You walk in, only to discover death. The tunnel ends at the smaller Senarti town you saw earlier down in the Senarti lands. When you tried to approach it, they fired all kinds of things at you.","You weren't lucky this time. You didn't have a chance to be amazed by the city's splendor.");
			kill_char(1000,2,0);
			end();
			}
break;